home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Libraries
/
SAT 2.3b4
/
Misc
/
SATminimalX ƒ
/
SATminimalX.p
< prev
next >
Wrap
Text File
|
1994-08-23
|
1KB
|
43 lines
{Minimal demo program, with a few sprites moving back and forth.}
{This variation of SATminimal uses three PICTs, one for color, one for b/w and one for the mask, for the}
{sprite faces instead of "cicn" resources. This file is the same as always, but InitMySprite in sMySprite.p}
{has changed.}
{Isn't the result perfect? No, it isn't, since I havn't bothered to get that exact pixel alignment needed. That's}
{why "cicn"s are so much nicer!}
program SATminimalX;
uses
SAT, sMySprite;
var
ignoreSp: SpritePtr;
l: longint;
begin
{Standard Inits are done by Think Pascal.}
{Initialize, using PICTs 128 or 129 as background, Classic-sized drawing area}
SATInit(128, 129, 512, 322);
{Initialize sprite unit(s), by preloading faces and sounds}
InitMySprite;
{Make some sprites}
ignoreSp := SATNewSprite(0, 50, 50, @SetupMySprite);
ignoreSp := SATNewSprite(0, 100, 100, @SetupMySprite);
ignoreSp := SATNewSprite(0, 125, 120, @SetupMySprite);
ignoreSp := SATNewSprite(0, 150, 140, @SetupMySprite);
ignoreSp := SATNewSprite(0, 200, 180, @SetupMySprite);
ignoreSp := SATNewSprite(0, 250, 200, @SetupMySprite);
ignoreSp := SATNewSprite(0, 300, 250, @SetupMySprite);
repeat
l := TickCount;
SATRun(true); {Run one frame of animation}
while l > TickCount - 3 do {Maximize speed to 20 fps}
;
until Button;
SATSoundShutUp; {Always de-allocate the sound channel before quitting!}
end.